var _class, _temp;

import Taro from '@tarojs/taro-rn';
import * as tslib_1 from "tslib";
import React from 'react';
import { Component } from "@tarojs/taro-rn";
import { View, RichText } from "@tarojs/components-rn";
import { toJS } from 'mobx';
import { inject, observer } from "@tarojs/mobx-rn";
import { getRuntime } from "../../utils/common";
import regist_agreementStyleSheet from "./regist_agreement_styles";
var _styleSheet = regist_agreementStyleSheet;
let RegistAgreement = (_temp = _class = class RegistAgreement extends Component {
  constructor(props) {
    super(props);
    this.state = {
      info: {}
    };
  }
  componentWillMount() {
    Taro.setNavigationBarTitle({ title: '注册协议' });
    this.getUserRegistAgreement();
  }
  handelRouter(url = '/pages/index/index') {
    getRuntime().navigateTo(url);
  }
  getUserRegistAgreement() {
    let { userStore } = this.props.stores;
    userStore.getUserRegistAgreement({
      callback: res => {
        this.setState({ info: toJS(res) });
      }
    });
  }
  render() {
    let { info } = this.state;
    return <View style={_styleSheet["my-help-detail"]}>
        <View style={_styleSheet["list-title"]}>{info['key']}</View>
        <View style={[_styleSheet["article-wrap"], _styleSheet["article"], _styleSheet["rich-text"]]}>
          <RichText nodes={info['content']} />
          {info}
        </View>
      </View>;
  }
}, _class.config = {
  navigationBarTitleText: '注册协议'
}, _temp);
RegistAgreement = tslib_1.__decorate([inject("stores"), observer], RegistAgreement);
export default RegistAgreement;